/*

Basic door script, that opens and closes when touched.

Usage (Level NPC):

function onCreated() {
  this.join("object_door");
}

*/

function onCreated() {
  // Set Image
  this.image = "door.png";
  // Give Shape
  this.setshape(1, 32, 32);
}

function onPlayerTouchsMe() {
  // Hide
  hide();
  // Sleep
  waitfor(this, "WakeUp", 3);
  // Show
  show();
}
